package com.wicket.okrfinance.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.wicket.okrfinance.biz.service.EvaCalcService;
import com.wicket.okrfinance.biz.service.dto.req.*;
import com.wicket.okrfinance.biz.service.dto.res.*;
import com.wicket.okrfinance.common.ro.OkrResult;
import com.wicket.okrfinance.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/finance/evaCalc/")
public class EvaCalcController {

  @Autowired
  EvaCalcService evaCalcService;
/**
   * D7执行Redis长生守护(公共)
   */
    @PostMapping("implementRedisLongevityGuardianCom")
    public OkrResult<ImplementRedisLongevityGuardianComRespDto> implementRedisLongevityGuardianCom(@RequestBody @Validated ImplementRedisLongevityGuardianComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementRedisLongevityGuardianCom(reqDTO));
    }
/**
   * D7新增单张牌财务标准数据(公共)
   */
    @PostMapping("addSingleFinaceStandardDataCom")
    public OkrResult<AddSingleFinaceStandardDataComRespDto> addSingleFinaceStandardDataCom(@RequestBody @Validated AddSingleFinaceStandardDataComReqDto reqDTO){
    return OkrResult.success(evaCalcService.addSingleFinaceStandardDataCom(reqDTO));
    }
/**
   * D7执行MQ长生守护(公共)
   */
    @PostMapping("implementMqLongevityGuardianCom")
    public OkrResult<ImplementMqLongevityGuardianComRespDto> implementMqLongevityGuardianCom(@RequestBody @Validated ImplementMqLongevityGuardianComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementMqLongevityGuardianCom(reqDTO));
    }
/**
   * D7执行MQ更新当前及祖先规划财务账户并推Redis(公共)
   */
    @PostMapping("implementUpdateCurAndUpFinacePushRedisCom")
    public OkrResult<ImplementUpdateCurAndUpFinacePushRedisComRespDto> implementUpdateCurAndUpFinacePushRedisCom(@RequestBody @Validated ImplementUpdateCurAndUpFinacePushRedisComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementUpdateCurAndUpFinacePushRedisCom(reqDTO));
    }
/**
   * D7执行MQ计算当前及祖先规划财务数据(公共)
   */
    @PostMapping("implementCalcCurAndUpFinaceDataCom")
    public OkrResult<ImplementCalcCurAndUpFinaceDataComRespDto> implementCalcCurAndUpFinaceDataCom(@RequestBody @Validated ImplementCalcCurAndUpFinaceDataComReqDto reqDTO){
    return OkrResult.success(evaCalcService.implementCalcCurAndUpFinaceDataCom(reqDTO));
    }
}
